package 草稿;

/**
 * @author IT_Jay
 * @date 2021/12/12 11:09 PM
 */
public class Test01 {
    public static void main(String[] args) {
        for (int i = 9; i >= 0; i--) {
            for (int j = 8; j >= i; j--) {
                System.out.print(" ");
            }
            for (int j = 0; j <= 9; j++) {      //j<=9是平行四边形，j<=i是倒垂直三角形
                System.out.print("*");
            }
            System.out.println();
        }
        //两个等腰合成一个菱形
        //等腰三角形
        for (int i = 1; i <= 9; i = i + 2) {
            for (int j = 9; j > i; j = j - 2) {
                System.out.print("\t");
            }
            for (int j = 0; j < i; j++) {
                System.out.print("*" + "\t");
            }
            System.out.println();
        }
        //倒着等腰三角形
        for (int i = 7; i > 0; i -= 2) {
            for (int j = 9; j > i; j -= 2) {
                System.out.print("\t");
            }
            for (int j = 0; j < i; j++) {
                System.out.print("*" + "\t");
            }
            System.out.println();
        }
    }
}
